From 9365b5518aec3794c15ebc29afff77b195b66d2d Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Thu, 22 Jul 2010 15:19:25 +0100 Subject: [PATCH] hvmloader: clear the whole shared-info page when shutting down xenbus since the contents might be in the wrong word-size for later users. Signed-off-by: Tim Deegan --- tools/firmware/hvmloader/xenbus.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/firmware/hvmloader/xenbus.c b/tools/firmware/hvmloader/xenbus.c index e980e47bef..12d67b38e7 100644 --- a/tools/firmware/hvmloader/xenbus.c +++ b/tools/firmware/hvmloader/xenbus.c @@ -63,9 +63,8 @@ void xenbus_shutdown(void) * having used the rings. */ memset(rings, 0, sizeof *rings); - /* Clear the xenbus event-channel too */ - get_shared_info()->evtchn_pending[event / sizeof (unsigned long)] - &= ~(1UL << ((event % sizeof (unsigned long)))); + /* Clear the event-channel state too. */ + memset(get_shared_info(), 0, PAGE_SIZE); rings = NULL; } -- 2.30.2